home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5254 < prev    next >
Encoding:
Text File  |  1996-08-06  |  887 b   |  42 lines

  1. Path: news.oanet.com!usenet
  2. From: martp@oanet.com
  3. Newsgroups: comp.lang.c++
  4. Subject: Q Re: struct and functions
  5. Date: Sat, 03 Feb 1996 09:18:27 GMT
  6. Organization: Central News Services
  7. Message-ID: <4ev3ud$89s@hermes.oanet.com>
  8. NNTP-Posting-Host: dialin38.oanet.com
  9. X-Newsreader: Forte Free Agent 1.0.82
  10.  
  11. Hi
  12.  
  13. I'm a second semister student in Computer Systems, and have a question
  14. about passing structs, for Win programming.
  15. I have a struct DATA containing, amongst other things, HWND, and
  16. COLORREF.
  17. How do I define, call, and make a header for a function,  so that I
  18. can just pass the DATA to the function, and separate the HWND and
  19. COLORREF in the header?
  20.  
  21. struct DATA {
  22. HWND hWnd;
  23. COLORREF cColor;
  24. }stData;
  25.  
  26. void fnChangeData( DATA stData );
  27.  
  28.     fnChangeColor( stData );
  29.  
  30.  
  31. void fnChangeColor( HWND hWnd, COLORREF cColor )
  32. {
  33.  
  34.       return;
  35. }
  36.  
  37. Thanks,
  38. Martin Pete
  39.  
  40. email martp@oanet.com
  41.  
  42.